﻿using System;
using System.Collections.ObjectModel;
using System.Configuration;

namespace MiniFox.Scripting.Configurations
{
    /// <summary>
    /// 
    /// </summary>
    public class ArgumentSettingCollection : KeyedCollection<string, ArgumentSetting>, IArgumentSettingCollection
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        protected override string GetKeyForItem(ArgumentSetting item)
        {
            return item.Name;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        IArgumentSetting IArgumentSettingCollection.this[string name] => this[name];
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        IEnumerator<IArgumentSetting> IEnumerable<IArgumentSetting>.GetEnumerator()
        {
            return this.GetEnumerator();
        }
    }
}